package com.hehua.web.observer.demo1;

import java.text.MessageFormat;

public class StockObserver extends Observer{


    public StockObserver(String name, Subject subject) {
        super(name, subject);
    }

    @Override
    public void update(){
        String format = MessageFormat.format("{0} {1}关闭股票行情继续工作", subject.getSubjectState(), name);
        System.out.println(format);
    }
}
